package com.shuqing.service;

import com.shuqing.domain.Book;
import com.shuqing.domain.User;
import com.shuqing.utils.PageResult;
import com.shuqing.utils.Result;
import org.apache.ibatis.annotations.Param;

/**
 * @program: ShuqingLibrary
 * @ClassName BookService
 * @description:
 * @author: Ats
 * @create: 2025-03-31 14:56
 * @Version 1.0
 */
public interface BookService {

 PageResult selectNewBooks(Integer pageNum, Integer pageSize);

 Book findBookById(Integer id);


 Integer borrowBook(Book book);

 PageResult searchBooks(Book book, Integer pageNum, Integer pageSize);


 Integer addBook(Book book);

 Integer editBook(Book book);

 PageResult searchBorrowed(Book book, User user, Integer pageNum, Integer pageSize);

 boolean returnBook(Integer id, User user);

 boolean returnConfirm(Integer id);
}

